import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
df = pd.read_csv('911.csv')
df['timeStamp'] = pd.to_datetime(df['timeStamp'])
df.set_index('timeStamp', inplace=True)
count_by_month = df.resample('ME')['title'].count()
print(count_by_month)
x = [i.strftime('%Y-%m-%d') for i in count_by_month.index]
y = count_by_month.values
plt.figure(figsize=(10, 10))
plt.xticks(range(len(x)), x, rotation=45)
plt.plot(range(len(x)), y)
plt.show()